home *** CD-ROM | disk | FTP | other *** search
- global points, pootimer, win, tableau, crappo, stock, topRow, midRow, botRow
-
- on checkwin
- if points = 390 then
- win = "yes"
- pootimer = timeout("poo").new(150, #gotoit)
- else
- checklose()
- end if
- end
-
- on checklose
- if stock.cards.count = 0 then
- repeat with g in [topRow, midRow, botRow]
- repeat with i = 1 to g.count()
- repeat with h = 1 to g.count()
- if i = h then
- next repeat
- end if
- if (sprite(g[i]).member.name = "backofcard") or (chars(sprite(g[i]).member.name, 1, 5) = "empty") then
- next repeat
- end if
- if (chars(sprite(g[i]).member.name, 1, 3) = chars(sprite(g[h]).member.name, 1, 3)) and (((sprite(g[i]).loc - sprite(g[h]).loc) = point(120, 0)) or ((sprite(g[i]).loc - sprite(g[h]).loc) = point(-120, 0))) then
- abort()
- end if
- end repeat
- end repeat
- end repeat
- win = "no"
- pootimer = timeout("poo").new(150, #gotoit)
- end if
- end
-
- on gotoit
- pootimer.forget()
- go("gameover")
- end
-